package com.bridge.common.enums;

/**
 * @program: card-voucher_new
 * @description:
 * @author: 陈迪
 * @create: 2022/10/20 14:10
 */
public enum  StatusEnum {


    SUCCESS("1","成功"),
    INITIAL("0","初始值"),
    FAIL("2","未成功"),
    ;

    private String type;
    private String desc;

    StatusEnum(String type, String desc){
        this.type=type;
        this.desc=desc;
    }

    public static String StatusEnum(String type) {

        for (StatusEnum var : StatusEnum.values()) {
            if (type == var.getType())
                return var.getDesc();
        }
        return "";
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
